<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>



    <script>
        function fn() {



            return new Promise((resolve, reject) => {
                let status = false

                if (status) {
                    setTimeout(() => {
                        resolve('我是正确的接口fn')

                    }, 3000)
                } else {

                    reject('错误')
                }
            })

        }

        async function fn1() {

            try {
                await fn()
            }
            catch (err) {
                console.log(err,'4444444444444');  //接收抛出的错误
            }

        }
   fn1()
    </script>
</body>

</html>